//
//  CWLocation.h
//  CWDevelop
//
//  Created by LittoCats on 7/22/14.
//  Copyright (c) 2014 Littocats. All rights reserved.
//
// GCJ by default coordinateType

#import <CoreLocation/CoreLocation.h>

typedef NS_ENUM(NSInteger, CWCoordinateOptions) {
    CWCoordinateOptionsGCJ              = 1,
    CWCoordinateOptionsWGS              = 2,
    CWCoordinateOptionsBaidu            = 3
};

@interface CWLocation : CLLocation

@property (nonatomic, readonly) NSDictionary *locationInfo;

+ (void)updateUserLocationWithCompletionHandler:(void (^)(NSArray *locations))handler;

+ (CWLocation *)locationWithLocationInfo:(NSDictionary *)location;

+ (CWLocation *)locationWithWGSLocation:(CLLocation *)location;

+ (CWLocation *)locationWithBDLocation:(CLLocation *)location;

- (NSDictionary *)locationInfoWithOptions:(CWCoordinateOptions)options;
@end


#ifndef ChinaMapShift_ChinaMapShift_h
#define ChinaMapShift_ChinaMapShift_h

CLLocationCoordinate2D transformFromWGSToGCJ(CLLocationCoordinate2D wgLoc);
CLLocationCoordinate2D transformFromGCJToWGS(CLLocationCoordinate2D gcLoc);
CLLocationCoordinate2D bd_encrypt(CLLocationCoordinate2D gcLoc);
CLLocationCoordinate2D bd_decrypt(CLLocationCoordinate2D bdLoc);

#endif